package com.xyzwps.paimon.furina.modules.tag

import kotlinx.datetime.LocalDateTime


object TagDomain {
    const val POST = 1

    fun validDomain(domain: Int): Int {
        if (domain != POST) throw IllegalArgumentException("Invalid TagDomain: $domain")
        return domain
    }
}

data class Tag(
    val id: Long,
    val domain: Int,
    val name: String,
    val createTime: LocalDateTime,
    val deleteTime: LocalDateTime?
) {
    fun deleted(): Boolean = deleteTime != null

    companion object {
        const val NAME_MAX_LENGTH = 30
    }
}